//权限管理路由
const express = require('express')
const router = express.Router()
    // 导入权限路由模块
const authorHandle = require('../router_handler/authorization')
    // 权限列表获取
router.get('/rights/:type', authorHandle.rightList)
router.get('/roles', authorHandle.rolesList)
router.post('/roles/:roleId/rights', authorHandle.updateRoleRights)
router.post('/roles', authorHandle.addRoles)
router.get('/roles/:id', authorHandle.searchRoles)
router.delete('/roles/:roleId/rights/:rightId', authorHandle.deleteRoleRight)
router.put('/roles/:id', authorHandle.updateRole)
router.delete('/roles/:id', authorHandle.deleteRole)
module.exports = router